feat(busted): Compact test output format#488
Conversation
|
Now also added print capturing within tests. Calls to Not sure if printing messages from passing / pending tests is desirable. I feel like some cleaning up (by me of course) wouldn't be a bad idea as some of the logic is duplicated. Probably fixable by writing a function or two with a few params :) |
|
This PR is over a year old. I would be also interested in a more compact output - or at least print some hint about the cause of a failed test run at the end of the output. I am contributing to some neovim plugins with a lot of tests and if one test fails, I find myself always searching for the cause, which is a bit cumbersome. |

Hello maintainers :)
Thank you for making plenary.nvim! When writing my own plugins I use the test suite of plenary so that I can run tests locally and on CI. This PR is another attempt at reducing the output of the busted implementation in plenary.nvim.
Related:
Unfortunately #86 was abandoned and even though some interest is shown in #237 this hasn't materialized.
The idea is that only pending and failing test messages are shown. I also reduced and formatted the output of fatal errors. Additionally, I noticed that when multiple instances of plenary.nvim are installed, the
busted.luafile gets sourced from the first plenary.nvim found inruntimepath. To fix this I tweaked the command which launches Neovim instances so that the plenary.nvim which is used to start the tests always uses thebusted.luafile from the same repository. This is done by prepending the plenary.nvim repo path toruntimepathat launch of each individual job.Finally there are some other modifications which basically make
PlenaryBustedFileandPlenaryBustedDirectoryequivalent in that both commands now allow specifying a path as well as an optional options table. Both commands now follow the same code path so testing a single file basically works the same as testing a directory.Please let me know what you think, I'm not sure if the code I wrote is necessarily up to par with what is expected.